package com.eshop.gen.utils;

import org.apache.commons.configuration.ConfigurationException;
import org.apache.commons.configuration.PropertiesConfiguration;
import org.apache.commons.configuration.Configuration;

public class ColUtil
{
    static String cloToJava(final String type) {
        final Configuration config = (Configuration)getConfig();
        assert config != null;
        return config.getString(type, "unknowType");
    }
    
    public static PropertiesConfiguration getConfig() {
        try {
            return new PropertiesConfiguration("generator.properties");
        }
        catch (ConfigurationException e) {
            e.printStackTrace();
            return null;
        }
    }
}
